package core

import (
	"io"
	"log"
	"net/http"
)

type HttpServer struct {
}

func HelloServer(w http.ResponseWriter, req *http.Request) {
	io.WriteString(w, "hello, world!\n")
	println("123123")
}

func HelloServer2(w http.ResponseWriter, req *http.Request) {
	io.WriteString(w, "nihao, world!\n")
	println("123123")
}
func (*HttpServer) Start() {
	http.HandleFunc("/hello", HelloServer)
	http.HandleFunc("/nihao", HelloServer2)
	log.Fatal(http.ListenAndServe(":80", nil))
}
